﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity.Configuration;
using Microsoft.Practices.Unity;
using Pigmalion.BusinessEntities; 
using Pigmalion.DataAccess;

namespace Pigmalion.BusinessLogic
{
    public partial class ProductoBL:IProductoBL
    {
        IProductoRepository ProductoRepository;

        public ProductoBL()
        {           

            using (IUnityContainer container = new UnityContainer())
            {
                container.LoadConfiguration();
                ProductoRepository = container.Resolve<IProductoRepository>();

            }
        }

        public List<Producto> GetAllFromProduto()
        {
           return ProductoRepository.GetAllFromProduto();
        }
    }
}
